/*
 * Copyright 2013 NJUT  qixiaobo. All rights reserved.
 */
package com.fujitsu.nanjing.tieba.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fujitsu.nanjing.tieba.base.BaseService;
import com.fujitsu.nanjing.tieba.ibator.CoreBackupTask;
import com.fujitsu.nanjing.tieba.ibator.CoreBackupTaskCriteria;
import com.fujitsu.nanjing.tieba.model.BackupTask;

/**
 * BackupTaskService.java
 * 
 * @author Administrator
 */
@Transactional
@Service
public class BackupTaskService
		extends
			BaseService<CoreBackupTask, CoreBackupTaskCriteria> {
	@Resource
	private BackupTask backupTask;
	@Override
	public CoreBackupTask findById(String id) {
		return backupTask.selectByPrimaryKey(Integer.parseInt(id));
	}

	@Override
	public CoreBackupTask insert(CoreBackupTask t) {
		backupTask.insertSelective(t);
		return t;
	}

	@Override
	public void update(CoreBackupTask t) {
		backupTask.updateByPrimaryKey(t);
	}

	@Override
	public void delete(CoreBackupTask t) {
		backupTask.deleteByPrimaryKey(t.getTaskid());

	}
}
